<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta http-equiv="Access-Control-Allow-Origin" content="*">
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <title>props</title>
</head>

<body>
  <div id="app">
    <h1>Chapter 2</h1>  
    <custom-button></custom-button>
    <custom-button>修改后的按钮文本</custom-button>
  </div>
  <script>
    Vue.component('custom-button', {
      template: '<button class="custom-button"><slot><span class="default-text">默认的按钮文本</span></slot></button>', 
    });
    new Vue({
      el: '#app'
    });
  </script>
</body>

</html>
